<?php
class TableSkinVo extends SzAbstractMySqlVo
{

    private $userId;
    private $skin;
    private $state;
    private $gain;
    private $createTime;
    private $endTime;

    /**
     * Initialize TableSkinVo.
     *
     * @param $userId
     * @param $skin
     * @param $state
     * @param $gain
     * @param $createTime
     * @param $endTime
     * @param boolean $isInsert default false, means for now this vo is initialized not for insert process
     * @return TableSkinVo
     */
    public function __construct($userId, $skin, $state, $gain, $createTime, $endTime, $isInsert = false) {
        $this->userId = $userId;
        $this->skin = $skin;
        $this->state = $state;
        $this->gain = $gain;
        $this->createTime = $createTime;
        $this->endTime = $endTime;

        $this->isInsert = $isInsert;
        $this->voClassName = 'TableSkinVo';
        $this->ormName = 'TableSkin';
    }

    /**
     * @see SzAbstractVo::toArray
     */
    public function toArray($needEncode = false)
    {
        return array(
            'userId' => $this->getUserId(),
            'skin' => $this->getSkin(),
            'state' => $this->getState(),
            'gain' => $this->getGain(),
            'createTime' => $this->getCreateTime(),
            'endTime' => $this->getEndTime(),
        );
    }

    /**
     * @see SzAbstractVo::toEntireArray
     */
    public function toEntireArray($needEncode = false)
    {
        return array(
            'userId' => $this->getUserId(),
            'skin' => $this->getSkin(),
            'state' => $this->getState(),
            'gain' => $this->getGain(),
            'createTime' => $this->getCreateTime(),
            'endTime' => $this->getEndTime(),
        );
    }

    /**
     * @see SzAbstractVo::toPureArray
     */
    public function toPureArray()
    {
        return array(
            $this->getUserId(),
            $this->getSkin(),
            $this->getState(),
            $this->getGain(),
            $this->getCreateTime(),
            $this->getEndTime(),
        );
    }

    public function getUserId()
    {
        return $this->userId;
    }

    public function setUserId($val)
    {
        $this->saveColumnStatus(0, $this->userId);
        $this->userId = $val;
    }

    public function getSkin()
    {
        return $this->skin;
    }

    public function setSkin($val)
    {
        $this->saveColumnStatus(1, $this->skin);
        $this->skin = $val;
    }

    public function getState()
    {
        return $this->state;
    }

    public function setState($val)
    {
        $this->saveColumnStatus(2, $this->state);
        $this->state = $val;
    }

    public function getGain()
    {
        return $this->gain;
    }

    public function setGain($val)
    {
        $this->saveColumnStatus(3, $this->gain);
        $this->gain = $val;
    }

    public function getCreateTime()
    {
        return $this->createTime;
    }

    public function setCreateTime($val)
    {
        $this->saveColumnStatus(4, $this->createTime);
        $this->createTime = $val;
    }

    public function getEndTime()
    {
        return $this->endTime;
    }

    public function setEndTime($val)
    {
        $this->saveColumnStatus(5, $this->endTime);
        $this->endTime = $val;
    }

}